package com.fh.controller;

import com.fh.model.OrderItem;
import com.fh.service.OrderItemService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("orderitem")
public class OrderItemController {

    @Resource
    private OrderItemService orderItemService ;

    @GetMapping("query")
    public List<OrderItem> query(@RequestParam("orderId") String orderId){
        return  orderItemService.query(orderId);
    }


}
